<template>
    <div class="image-box">
        <div v-for="item in images" :key="item.key">
            <div class="image-mark">
                <img :src="getItemImg(item)" alt="" height="200px">
            </div>
        </div>
    </div>
</template>
<style lang="less" scoped>
.image-box {
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: url('../image/gb-wall.png');
    background-size: cover;
}
.image-mark {
    height: 240px;
    padding: 20px;
    background: rgb(128, 201, 229);
    box-shadow: 2px 2px 5px #223366;
    position: relative;
    &::before {
        content: '';
        position: absolute;
        top: -50px;
        left: 50%;
        transform: translateX(-29px);
        height: 58px;
        width: 58px;
        background: url('../image/sharpicons_hanger.png');
        background-size: cover;
    }
}
</style>
<script>
export default {
    name: 'ImageWall',
    props: {
        images: {
            type: Array,
            default: () => {
                return []
            }
        }
    },
    data() {
        return {
            //none
        }
    },
    methods: {
        init() {
            //none
        },
        getItemImg(item) {
            let key = item.key;
            switch(key) {
                case 1: {
                    return require('../image/1.jpg');
                }
                break;
                case 2: {
                    return require('../image/2.jpg');
                }
                break;
                case 3: {
                    return require('../image/3.jpg');
                }
                break;
                case 4: {
                    return require('../image/4.jpg');
                }
                break;
            }
        }
    }
}
</script>